package org.gap.jseed.utils;

public class StringUtils {

	public static String indentAllLines(String toIndent) {
		String result = "";
		
		boolean endsWithNewLine = toIndent.endsWith("\n");
		
		for (String each : toIndent.split("\n")) {
			result += "\t" + each + "\n";
		}
		
		if (!endsWithNewLine) {
			result = result.substring(0, result.length() - 1);
		}
		
		return result;
	}

	public static boolean startsWith(String name, String...expressions) {
		for (String each : expressions) {
			if (name.startsWith(each)) {
				return true;
			}
		}
		return false;
	}
	
	private StringUtils() {}
}
